<template>
    <div class="user-item-one">
        <div>
            <a-button type="primary" @click="clickChange">修改日期</a-button>
            <a-date-picker v-model="currentTime" @change="handleDateChange" />
            <a-tag>已做keep-alive</a-tag>
        </div>
    </div>
</template>

<script>
export default {
    name: "userItemOne",
    data() {
        return {
            currentTime: null,
        };
    },
    components: {},
    mounted() {
        console.log("进入mounted");
    },
    activated() {
        console.log("进入activated");
    },
    methods: {
        handleDateChange(e, date) {
            this.currentTime = date;
        },
        clickChange() {
            this.currentTime = "1996-10-01";
        },
    },
};
</script>

<style lang="less" scoped>
.user-item-one {
    .ant-calendar-picker {
        margin: 0 10px;
    }
    .ant-tag {
        height: 32px;
        line-height: 32px;
    }
}
</style>
